package com.songshuai.webapi.crm.dto.response.customerfollow;

import com.songshuai.webapi.baseapi.enumerations.*;
import com.songshuai.webapi.baseapi.enumerations.crm.*;
import com.songshuai.webapi.crm.util.Util;
import lombok.Data;
import java.util.Date;

@Data
public class CustomArticleResDto {

    //学员ID
    private String customId;
    //学员姓名
    private String customName;
    //学员性别
    private Integer sex;
    private String sexStr;

    public String getSexStr() {
        return CustomSexType.getMsg(sex);
    }


    //号码关系
    private Integer relation;

    public String getRelationStr() {
        return RelationEnum.getMsg(relation);

    }


    //学员手机号
    private String phone;

    //跟进状态
    private Integer followStatus;
    private String followStatusStr;

    public String getFollowStatusStr() {
        return FollowStatusEnum.getMsg(followStatus);
    }

    //意向级别
    private Integer intend;
    private String intendStr;

    public String getIntendStr() {
       return CustomIntendEnum.getMsg(intend);
    }

    //学校
    private String school;

    //学员类型
    private Integer customType;
    private String customTypeStr;

    public String getCustomTypeStr() {
        return StudentTypeEnum.getMsg(customType);
    }

    //生日
    private Date birthday;

    private Date birthdayStr;

    public String getBirthdayStr() {
        return Util.ChangeDateToString(birthday,"yyyy-MM-dd");
    }

    //年龄
    private String age;

    public String getAge() {

        if(birthday == null){
            return "";
        }
        int age = (new Date().getYear() - birthday.getYear());
        return String.valueOf(age);
    }

    //来源
    private Integer firstSource;
    private String firstSourceStr;


    //备用号码关系
    private Integer relationBackup;

    public String getRelationBackupString() {
        return RelationEnum.getMsg(relationBackup);
    }

    //备用手机号
    private String phoneBackup;

    //阶段
    private Integer stage;
    private String stageStr;

    public String getStageStr() {
       return StepEnum.getMsg(stage);
    }

    //年级
    private Integer grade;
    private String gradeStr;

    public String getGradeStr() {
        return GradeEnum.getMsg(grade);
    }

    //家庭住址
    private String homeAddress;

    //备注
    private String remark;


}
